import type { Config } from 'drizzle-kit';
import * as dotenv from 'dotenv';
import { env } from '~/common/global/env';

dotenv.config();

export default {
  schema: './src/db/schema.ts',
  out: './drizzle',
  dialect: 'mysql',
  dbCredentials: {
    host: env('DB_HOST') || 'localhost',
    port: Number(env('DB_PORT')) || 3306,
    user: env('DB_USER') || 'root',
    password: env('DB_PASSWORD') || '',
    database: env('DB_NAME') || 'test',
  },
} satisfies Config; 